Reset Password Request
When a user requests to reset their password, an email is sent to them containing a unique reset password link. Clicking on this link will direct them to a page where they can securely set a new password for their account. This process ensures that only the legitimate account holder can change the password, maintaining the security of their information. The reset password link has a limited time validity, so it’s crucial for users to complete the password reset within the given time frame to avoid needing to request a new link.
Endpoint
To resend the email verification link to the user, make a POST
request to the following endpoint:
https://api.betatel.com/api/auth/reset-password/resend
Request Headers
The request must include an Authorization header with a valid JWT token for authentication:
Header | Value | Required | Description |
---|---|---|---|
Authorization | {{access_token}} | Yes | The authentication token to verify the user's identity |
Request Body
Your request should contain the email for the user:
{
"email": "povid681@nokdot.com",
}
Param | Value | Type | Required | Description |
---|---|---|---|---|
povid681@nokdot.com | String | Yes | The user's email |
Let’s Dive Into the Code!
Choose your preferred programming language and use the provided examples to integrate the login
- cUrl
- Python
- Node.js
- PHP
- Java
- C#
curl --location 'https://api.betatel.com/api/auth/reset-password/resend' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "povid681@nokdot.com"
}'
import http.client
import json
conn = http.client.HTTPSConnection("api.betatel.com")
payload = json.dumps({
"email": "povid681@nokdot.com"
})
headers = {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0',
'Content-Type': 'application/json'
}
conn.request("POST", "/api/auth/reset-password/resend", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const axios = require('axios');
let data = JSON.stringify({
"email": "povid681@nokdot.com"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.betatel.com/api/auth/reset-password/resend',
headers: {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.betatel.com/api/auth/reset-password/resend',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"email": "povid681@nokdot.com"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api.betatel.com/api/auth/reset-password/resend")
.header("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0")
.header("Content-Type", "application/json")
.body("{\r\n \"email\": \"povid681@nokdot.com\"\r\n}")
.asString();
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.betatel.com/api/auth/reset-password/resend");
request.Headers.Add("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0");
var content = new StringContent("{\r\n \"email\": \"povid681@nokdot.com\"\r\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Response
JSON Schema:
{
"message": "Reset password email sent successfully"
}
🎉 Success – The Reset Password Email Has Been Resent!
🔜 What’s Next? The user has now been sent a new verification email. You can proceed with other user management functionalities such as handling login sessions, or securing the account with a password reset.